import request from '@/utils/request'
export default {
    
    /**
     * 1 添加课程信息
     * 2021/3/11/14
     * @param {*} courseInfo 
     * @returns   
     */
    addCourseInfo(courseInfo) {
        return request({
            url: '/eduservice/edu-course/addCourseInfo',
            method: 'post',
            data:courseInfo
          })
    },
    /**
     * 2 查询所有讲师
     * 2021/3/11/14
     * @returns 
     */
    getListTeacher() {
        return request({
            url: '/eduservice/edu-teacher/findAll',
            method: 'get'
        })
    },
    /**
     * 3.根据课程id查询课程基本信息 
     * 2021/3//11/17
     * @param {*} id 
     * @returns 
     */
    getCourseInfoId(id) {
        return request({
            url: '/eduservice/edu-course/getCourseInfo/'+id,
            method: 'get'
          })
    },
    /**
     * 4.修改课程信息
     * 2021/3/11/17
     * @param {*} courseInfo 
     * @returns 
     */
    updateCourseInfo(courseInfo) {
        return request({
            url: '/eduservice/edu-course/updateCourseInfo',
            method: 'post',
            data: courseInfo
          })
    },
    /**
     * 5.课程信息确认
     * 2021/3/12/15
     */
    getPublishCourseInfo(id){
        return request({
            url: '/eduservice/edu-course/getPublishCourseInfo/'+id,
            method: 'get',
     })

    },
   /**
    * 
    * @param {课程的最终发布} id 
    * @returns 
    */
    publishCourse(id){
        return request({
            url: '/eduservice/edu-course/publishCourse/'+id,
            method: 'post',
     })
    },
    /**
    * 
    * @param {课程列表} 
    * @returns 
    */
     getListCourse(){ 
        return request({
            url: '/eduservice/edu-course/list',
            method: 'get',
     })
    },
    /**
     * 
     * @param {删除课程  课程表 课程描述表 章节表 小结表} id 
     * @returns 
     */
    delete(id){ 
        return request({
            url: '/eduservice/edu-course/delete/'+id,
            method: 'delete',
     })
    },
    
}